/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view;

import controller.menuController;

/**
 *
 * @author JorgeLuis
 */
public class menuView extends javax.swing.JPanel {
    private menuController controller;

    /**
     * Creates new form menuView
     */
    public menuView() {
        initComponents();
        this.setSize(61, 92);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonSelect = new javax.swing.JButton();
        buttonPoint = new javax.swing.JButton();
        buttonRoad = new javax.swing.JButton();
        buttonArea = new javax.swing.JButton();
        buttonAreaEdit = new javax.swing.JButton();

        setLayout(new java.awt.GridLayout(0, 1));

        buttonSelect.setText("Select");
        buttonSelect.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSelectActionPerformed(evt);
            }
        });
        add(buttonSelect);

        buttonPoint.setText("Point");
        buttonPoint.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonPointActionPerformed(evt);
            }
        });
        add(buttonPoint);

        buttonRoad.setText("Road");
        buttonRoad.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonRoadActionPerformed(evt);
            }
        });
        add(buttonRoad);

        buttonArea.setText("Area");
        buttonArea.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonAreaActionPerformed(evt);
            }
        });
        add(buttonArea);

        buttonAreaEdit.setText("Edit Area");
        buttonAreaEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonAreaEditActionPerformed(evt);
            }
        });
        add(buttonAreaEdit);
    }// </editor-fold>//GEN-END:initComponents

    private void buttonPointActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPointActionPerformed
        // TODO add your handling code here:
        this.controller.setState("point");
    }//GEN-LAST:event_buttonPointActionPerformed

    private void buttonSelectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSelectActionPerformed
        // TODO add your handling code here:
        this.controller.setState("select");
    }//GEN-LAST:event_buttonSelectActionPerformed

    private void buttonRoadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonRoadActionPerformed
        // TODO add your handling code here:
        this.controller.setState("road");
    }//GEN-LAST:event_buttonRoadActionPerformed

    private void buttonAreaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAreaActionPerformed
        // TODO add your handling code here:
        this.controller.setState("area");
    }//GEN-LAST:event_buttonAreaActionPerformed

    private void buttonAreaEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonAreaEditActionPerformed
        // TODO add your handling code here:
        this.controller.setState("editArea");
    }//GEN-LAST:event_buttonAreaEditActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton buttonArea;
    private javax.swing.JButton buttonAreaEdit;
    private javax.swing.JButton buttonPoint;
    private javax.swing.JButton buttonRoad;
    private javax.swing.JButton buttonSelect;
    // End of variables declaration//GEN-END:variables

    public void controller(menuController aThis) {
        this.controller = aThis;
    }
}
